﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.ServiceModel;
using System.ServiceModel.Description;
using System.Windows.Markup;
using System.Windows.Media.Media3D;
using CrazyClient.Properties;

namespace CrazyClient
{
    /// <summary>
    /// Interaction logic for Window1.xaml
    /// </summary>
    /// 
    
    public partial class Window1 : Window
    {
        public Window1()
        {
            InitializeComponent();
           
        }
       
       
       void AddClientControl(string name,string clientUrl)
       {
           TextBlock n = new TextBlock();
           n.Text = name;
           ClientControl c=new ClientControl();
           
           ClientDisplayStack.Children.Add(n);
           ClientDisplayStack.Children.Add(c);
           c.StartClient(clientUrl);
       }
        
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            AddClientControl("Client 1",Settings.Default.Client1);
            if (Settings.Default.TestClient)
            {
            AddClientControl("Client 2",Settings.Default.Client2);
            AddClientControl("Client 3",Settings.Default.Client3);
            
              
            }
           

        }
        
        
     
       
    }

}